<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>菜单管理</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.css}" rel="stylesheet">
    <link th:href="@{/css/index.css}" rel="stylesheet">
    <link th:href="@{/css/config.css}" rel="stylesheet">
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet">
    <link th:href="@{/css/jquery.pagination.css}" rel="stylesheet">

</head>

<body>
<!-- nav导航 -->
<div th:replace="common/bar::#header"></div>
<!-- 页面主体 -->
<div class="dh mainbox">
    <!-- 左边菜单 -->
    <div th:replace="common/bar::#menu"></div>
    <!-- 右边主显示部分 -->
    <div class="main-rightbox">
        <div class="mainrightbox">
            <!-- 路径导航 -->
            <ol class="breadcrumb">
                <li><a th:href="@{/}">首页</a></li>
                <li class="active">基础管理</li>
                <li class="active">菜单管理</li>
            </ol>
            <center>
                <div>
                    <p style="font-size: 20px;color: red" th:text="${'当前影院:'+movieTheatre.name}"></p>
                    <img style="width: 150px;height: 150px" th:src="${movieTheatre.previewUrl}">
                </div>
            </center>
            <!-- 显示表格 -->
            <div class="main_box">
                <!-- 表格显示区域 -->
                <div class="maintab">
                    <table class="table table-striped table-bordered table-hover" id="sample_1">
                        <thead>
                        <tr>
                            <th>Id</th>
                            <th class="">电影名</th>
                            <th class="">电影图片</th>
                            <th class="">开始时间</th>
                            <th class="">结束时间</th>
                            <th class="">语言版本</th>
                            <th class="">放映厅</th>
                            <th class="">价格</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr class="odd gradeX" th:each="movieTheatreShowVo:${movieTheatreShowVos}">
                            <td th:text="${movieTheatreShowVo.id+''}">1000</td>
                            <td th:text="${movieTheatreShowVo.movieName}">user-0</td>
                            <td><img style="height: 80px;width: 80px" th:src="${movieTheatreShowVo.moviePreviewUrl}"></td>
                            <td th:text="${#dates.format(movieTheatreShowVo.startDate,'yyyy-MM-dd HH:mm')}">女</td>
                            <td th:text="${#dates.format(movieTheatreShowVo.endDate,'yyyy-MM-dd HH:mm')}">在线</td>
                            <td th:text="${movieTheatreShowVo.languageVersion}">在线</td>
                            <td th:text="${movieTheatreShowVo.videoHall}">在线</td>
                            <td th:text="${movieTheatreShowVo.price}">在线</td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="rows">
                        <div class="col-md-10 col-md-offset-1">
                            <form role="form" class="form-horizontal rows" id="form-test" method="post"
                                  action="/movie/show/add">

                                <input type="hidden" th:value="${movieTheatre.id}" name="movieTheatreId">
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">电影id</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="movieId" placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">开始时间</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="startDate" placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">结束时间</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="endDate" placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">语言版本</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="languageVersion"
                                               placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">放映厅</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="videoHall" placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-6">
                                    <label for="user" class="col-sm-3 control-label">价格</label>
                                    <div class="col-sm-9">
                                        <input type="text" class="form-control" name="price" placeholder="请输入影院名"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-12">
                                    <div class="col-sm-offset-5 col-sm-2">
                                        <button id="btn-test" type="submit" class="btn btn-primary">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- 引入公共js文件 -->
        <script th:src="@{/js/jquery-3.3.1.min.js}"></script>
        <script th:src="@{/js/jquery.slimscroll.min.js}"></script>
        <script th:src="@{/js/bootstrap.js}"></script>
        <script th:src="@{/js/jquery.pagination.min.js}"></script>

        <script>
            /**
             *  此方法为切换左边菜单的js文件
             */
            $(".list_dt").on("click", function () {
                $('.list_dd').stop();
                $(this).siblings("dt").removeAttr("id");
                if ($(this).attr("id") == "open") {
                    $(this).removeAttr("id").siblings("dd").slideUp();
                } else {
                    $(this).attr("id", "open").next().slideDown().siblings("dd").slideUp();
                }
            });

            /**
             * 退出登录
             */
            function logout() {
                window.location.href = "login.html";
            };


        </script>
</body>

</html>